package com.sosee.cgfw.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.sosee.cgfw.activity.ScheduleDetailActivity;
import com.sosee.cgfw.entity.JsonData;
import com.sosee.cgfw.utils.LogUtils;

/**
 * Created by Thinkpad on 2016/2/2.
 * 处理设置提醒 的 广播接收者
 */
public class AlarmReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        JsonData data= (JsonData) intent.getSerializableExtra("detail");
        Intent in=new Intent(context,ScheduleDetailActivity.class);
        in.putExtra("detail",data);
        in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(in);
        boolean test=(data.getData()==null);
        LogUtils.log_E("测试广播接收者传递数据："+test);
    }
}
